var exp = module.exports;
// sid scode 是客户端传上来的玩家验证码,这个需要加入到玩家管理中
// 验证玩家合法性
exp.vertifyUser = function (sid, scode, callback) {
    callback({
        isSuccess: true,
        money: 1300,
        name: '沉默的羔羊slient',
        avatar: 'http://wx.qlogo.cn/mmopen/eFvXSNCqWRPkAwK4PfNW1CZuzo2kwhsibXficAMeGdTH4MZHrco95iawepoENYbwdgwR0SW09gR6icX6RNibqOSSEAEdPj6AUicPNv/0'
    });
    //for test
    //callback(null, {isSuccess: true, money: 1230000, name: playerInfo.name, avatar: playerInfo.headUrl});
};

// 提交玩家分数, 记入数据库
exp.updateMoney = function (sid, scode, money, callback) {
    console.log('updateMoney ', sid, scode, money);
    callback({isSuccess: true, code: 200});
    //返回参数 callback(err,{code:200});
};


////领取救济金
//exp.getBrokenMoney = function (sid, scode, callback) {
//    console.log('领取救济金..');
//    //callback(null, {isSuccess: true, money: 10000});
//    //返回参数
//};
////充值
//exp.purchase = function(sid,scode,callback){
//    console.log('purchase');
//};
//
////更新登陆时间 以及刷新领取救济金次数
//exp.updateLoginTime = function(sid,loginTime,getMoneyCounts,cb){
//    //返回参数 callback(err,{code:200});
//};
//
////通过sid返回当前玩家的所有信息
//exp.getUserBySid = function(sid,callback){
//    //callback(err,res);
//    //返回参数 call(err,res); res = {玩家的基本信息(name,money,headUrl,)}
//};
//
////更新领取救济金次数以及money  //参数 今日已领取救济金的次数 当前的金币数
//exp.updateGetMoneyCountsAndMoney = function(sid, getMoneyCounts, money, callback){
//    //返回参数 callback(err,{code:200});
//};


